home *** CD-ROM | disk | FTP | other *** search
- /* CSUBW.H -- HTBasic Windows CSUB C Language Include File Revision 8.0 */
- /* (c) Copyright 1989-2000 TransEra Corp. All Rights Reserved */
-
- #define MX_STLEN 32767 /* maximum string length */
- #define MX_SUBS 6 /* maximum number of subscripts */
-
- typedef unsigned char U_CHAR;
- typedef unsigned short int U_SHORT;
- typedef unsigned long U_LONG;
-
- typedef short int T_SUBS; /* subscript value */
-
- typedef struct subs /* SUBSCRIPT BOUNDS DATA */
- {
- T_SUBS base; /* subscript lower bound value */
- T_SUBS size; /* number of elements */
- } SUBS;
-
- typedef struct dim /* DIMENSION TABLE ENTRY */
- {
- U_LONG elen; /* Element LENgth (string max len) (bytes) */
- U_LONG tae; /* Total Allocated Elements (upper byte nod) */
- U_LONG cae; /* Current Allocated Elements */
- SUBS sbs[MX_SUBS]; /* Subscript Bounds */
- } DIM;
-
- /* The upper byte of dim.tae is used to store the number of dimensions */
-
- #define NOD(d) (((d)->tae >> 24) &0xFF) /* number of dimensions */
- #define TAE(d) ( (d)->tae & 0x00FFFFFF ) /* total array elements */
-
- typedef short int T_INT; /* BASIC INTEGER value */
- typedef double T_FLT; /* BASIC REAL value */
-
- typedef struct t_cpx /* BASIC COMPLEX value */
- {
- T_FLT r; /* real part */
- T_FLT i; /*imaginary part */
- } T_CPX;
-
- typedef struct t_str /* BASIC STRING Data */
- {
- T_SUBS clen; /* current string length */
- U_CHAR str[MX_STLEN]; /* string data */
- } T_STR;
-
- typedef DIM *dimptr; /* pointer to Dimension Structure */
- typedef T_INT *intptr; /* pointer to INTEGER Value */
- typedef T_FLT *realptr; /* pointer to REAL Value */
- typedef T_CPX *cpxptr; /* pointer to COMPLEX Value */
- typedef T_STR *strptr; /* pointer to String Structure */
-
- __declspec(dllexport) void *(*_fnd_com)(); /* COM memory finder */
- #define com_var(n,v,p) (*_fnd_com)( (char *)(n), (int)(v), (int)(p) )
-
- /* CSUB Jump Table Definition */
-
- __declspec(dllexport) int (** _cjmptbl)(); /* ptr to csub jump table */
-
- #define CSB_VER ((long)_cjmptbl[ 0])
-
- #define kbdcrt_check() if( CSB_VER < 16 ) return( 2009 )
-
- /* Keyboard and Display Routines */
-
- #define kbdcrt_clear_screen (*_cjmptbl[ 2])
- #define kbdcrt_controlcrt(r,v) (*_cjmptbl[ 3])((int)(r),(int)(v))
- #define kbdcrt_controlkbd(r,v) (*_cjmptbl[ 4])((int)(r),(int)(v))
- #define kbdcrt_crtreadstr(b,m,l) (*_cjmptbl[ 5])((char*)(b),(int)(m),(int*)(l))
- #define kbdcrt_crtscroll(f,l,d) (*_cjmptbl[ 6])((int)(f),(int)(l),(int)(d))
- #define kbdcrt_cursor(c,l,t) (*_cjmptbl[ 7])((int)(c),(int)(l),(int)(t))
- #define kbdcrt_dispstr(c,l,b,s,a) (*_cjmptbl[ 8])((int)(c),(int)(l),(char *)(b),(int)(s),(int)(a))
- #define kbdcrt_printstr(b,l) (*_cjmptbl[ 9])((char*)(b),(int)(l))
- #define kbdcrt_readkbd(b,m,l) (*_cjmptbl[10])((char*)(b),(int)(m),(int*)(l))
- #define kbdcrt_scrolldn (*_cjmptbl[11])
- #define kbdcrt_scrollup (*_cjmptbl[12])
- #define kbdcrt_statuscrt(r,v) (*_cjmptbl[13])((int)(r),(int*)(v))
- #define kbdcrt_statuskbd(r,v) (*_cjmptbl[14])((int)(r),(int*)(v))
- #define kbdcrt_systemd(a,b,m,l) (*_cjmptbl[15])((char*)(a),(int)(b),(int)(m),(int*)(l))
-
- /* end of CSUBW.H */